﻿using BCEntity.Common.Banner;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Common.Banner
{
    /// <summary>
    /// Banner分类数据处理接口
    /// </summary>
    public interface IBannerTagcodeData
    {
        /// <summary>
        /// 检查Banner分类信息是否存在
        /// </summary>
        /// <param name="bannerTagcode">Banner分类编号</param>
        /// <returns></returns>
        bool CheckBannerTagcodeExists(string bannerTagcode);
        /// <summary>
        /// 添加Banner分类信息
        /// </summary>
        /// <param name="bannerTagcodeEntity">Banner分类信息</param>
        /// <returns></returns>
        BannerTagcodeEntity Add(BannerTagcodeEntity bannerTagcodeEntity);
        /// <summary>
        /// 更新Banner分类信息
        /// </summary>
        /// <param name="bannerTagcodeEntity">Banner分类信息</param>
        /// <returns></returns>
        BannerTagcodeEntity Update(BannerTagcodeEntity bannerTagcodeEntity);
        /// <summary>
        /// 获取Banner分类信息
        /// </summary>
        /// <param name="bannerTagcode">Banner分类编号</param>
        /// <returns></returns>
        BannerTagcodeEntity Get(string bannerTagcode);
        /// <summary>
        /// 删除Banner分类信息
        /// </summary>
        /// <param name="bannerTagcode">Banner分类编号</param>
        void Delete(string bannerTagcode);
        /// <summary>
        /// 获取Banner分类信息列表
        /// </summary>
        /// <returns></returns>
        IEnumerable<BannerTagcodeEntity> GetList();
        /// <summary>
        /// 获取Banner分类信息列表（分页）
        /// </summary>
        /// <param name="tagCode">Banner分类编号</param>
        /// <param name="dataCount">返回数据总数</param>
        /// <param name="ascending">排序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        IEnumerable<BannerTagcodeEntity> GetPageableList(string tagCode, out int dataCount, bool? ascending, int pageIndex = 1, int pageSize = 20);
        /// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="bannerTagcode">Banner分类编号</param>
		Task<bool> Exists(string bannerTagcode);
        /// <summary>
		/// 启用Banner分类
		/// </summary>
		/// <param name="bannerTagcode">Banner分类编号</param>
		Task<bool> Enabled(string bannerTagcode);
        /// <summary>
        /// 禁用Banner分类
        /// </summary>
        /// <param name="bannerTagcode">Banner分类编号</param>
        Task<bool> Disabled(string bannerTagcode);
    }
}
